AddMany Method

Wintellect PowerCollections

Collapse imageExpand ImageCollapseAll imageExpandAll imageDropDown imageDropDownHover imageCopy imageCopyHover image
[This topic is pre-release documentation and is subject to change in future releases. Blank topics are included as placeholders.]

Adds multiple key-value pairs to a dictionary. If a key exists in both the current instance and dictionaryToAdd, then the value is updated with the value from keysAndValues> (no exception is thrown). Since IDictionary<TKey,TValue> inherits from IEnumerable<KeyValuePair<TKey,TValue>>, this method can be used to merge one dictionary into another.

Namespace: Wintellect.PowerCollections
Assembly:  PowerCollections (in PowerCollections.dll)

Syntax

C#
public void AddMany(
	IEnumerable<KeyValuePair<TKey, TValue>> keysAndValues
)
Visual Basic (Declaration)
Public Sub AddMany ( _
	keysAndValues As IEnumerable(Of KeyValuePair(Of TKey, TValue)) _
)
Visual C++
public:
void AddMany (
	IEnumerable<KeyValuePair<TKey, TValue>>^ keysAndValues
)

Parameters

keysAndValues
IEnumerable<(Of <KeyValuePair<(Of <TKey, TValue>)>>)>
A collection of keys and values whose contents are added to the current dictionary.

Remarks

AddMany takes time O(M log (N+M)), where M is the size of keysAndValues>, and N is the size of this dictionary.

See Also